import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {UserCenterComponent} from './user-center.component';
import {RouterModule} from '@angular/router';
import {HomeComponent} from './home/home.component';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {HttpLoaderFactory} from '../app.module';
import {HttpClient} from '@angular/common/http';
import {NgZorroAntdModule} from 'ng-zorro-antd';
@NgModule({
  imports: [
    CommonModule,
    TranslateModule.forChild({
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpClient]
      }
    }),
    RouterModule.forChild([{
      path: '', component: UserCenterComponent,
      children: [
        {path: '', redirectTo: 'home', pathMatch: 'full'},
        {path: 'home', component: HomeComponent},
      ]
    }]),
    NgZorroAntdModule
  ],
  declarations: [
    UserCenterComponent,
    HomeComponent
  ]
})
export class UserCenterModule {
}
